<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
</head>
<body>
	<form action="${pageContext.request.contextPath}/guoli/user/${user.id}/update" method="post" onsubmit="return validateCallback(this, dialog1AjaxDone)">
		<table>
			<tr>
				<td><h1>ID: ${user.id }</h1></td>		
			</tr>
			<tr>
				<td>
					username:<input type="text" name="name" value="${user.name }">
				</td>		
			</tr>
			<tr>
				<td>
					password:<input type="text" name="password" value="${user.password }">
				</td>
			</tr>
			<tr>
				<td>
					<input type="submit" value="更新">
				</td>
			</tr>
		</table>
	</form>
	
	<script type="text/javascript">
		function dialog1AjaxDone(json){
			DWZ.ajaxDone(json);
			if (json.statusCode == DWZ.statusCode.ok){
				if (json.navTabId){
					 navTab.reloadFlag(json.navTabId);
				}
				if ("closeCurrent" == json.callbackType) {
					$.pdialog.closeCurrent();
				}
			}
		}
	</script>
</body>
</html>